<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Guest Template</title>
        <h:outputStylesheet name="style.css" />
    </h:head>
    <h:body>
        <p:layout fullPage="true" 
                  style="min-width:400px;min-height:800px;">
            <p:layoutUnit position="north" 
                          style="min-height: 242px">
                <h:form> 
                    <img class="content" src="img/MeteoCalImage.png" alt="immagine top"></img>
                    
                    <p:toolbar>
                        <p:toolbarGroup align="left">
                            <p:commandButton value="Home" action="home?faces-redirect=true"  styleClass="buttonMenu"/>
                            <p:commandButton value="Calendar" action="calendar?faces-redirect=true" styleClass="buttonMenu"/>
                            <p:commandButton value="Invitation List" action="invitationlist?faces-redirect=true" styleClass="buttonMenu"/>
                            <p:commandButton action="#{loginBean.logout()}" value="Logout" styleClass="buttonMenu">
                                <p:confirm header="Confirmation" message="Are you sure that you want to log out?" icon="ui-icon-alert" />
                            </p:commandButton>
                        </p:toolbarGroup>
                        <p:toolbarGroup align="right">
                            <h:panelGrid columns="4">
                                <p:inputText id="searchfield" value="#{searchFieldBean.username}" style="">
                                    <p:ajax update="searchfieldmsg"/>
                                </p:inputText>
                                <p:watermark for="searchfield" value="Search..." id="watermark" />
                                <p:message id="searchfieldmsg" for="searchfield" />
                                <p:commandLink action="#{searchFieldBean.search()}" title="Search" styleClass="ui-icon ui-icon-search"/>
                            </h:panelGrid>
                        </p:toolbarGroup>
                    </p:toolbar>
                    
                    <p:confirmDialog global="true" showEffect="fade" hideEffect="explode">
                        <p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check"/>
                        <p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
                    </p:confirmDialog>

                </h:form>
            </p:layoutUnit>
            <p:layoutUnit position="west" size="100" style="border-left: 0px;border-bottom: 0px">
            </p:layoutUnit>
            <p:layoutUnit position="center" resizable="true">
                <ui:insert name="center"></ui:insert>
            </p:layoutUnit>
            <p:layoutUnit position="east" size="100" style="border-right: 0px;border-bottom: 0px">
            </p:layoutUnit>
        </p:layout>
    </h:body>
</html>
